package com.entity;

import java.io.Serializable;
import java.util.List;

/**
 * @author 
 */
public class Setmeal implements Serializable {
    /**
     * 每餐计划编号
     */
    private String smid;

    /**
     * 套餐名称
     */
    private String smname;

    /**
     * 套餐描述
     */
    private String smdesc;

    /**
     * 套餐价格
     */
    private Float smprice;

    /**
     * 套餐卡路里
     */
    private String smcalorie;

    /**
     * 套餐蛋白质
     */
    private String smprotein;

    /**
     * 套餐糖含量
     */
    private String smsugar;

    /**
     * 套餐状态
     */
    private Integer smstate;

    /**
     * 营养师编号
     */
    private String did;

    private List<SetmealFood> setmealFoods;

    private static final long serialVersionUID = 1L;

    public String getSmid() {
        return smid;
    }

    public void setSmid(String smid) {
        this.smid = smid;
    }

    public String getSmname() {
        return smname;
    }

    public void setSmname(String smname) {
        this.smname = smname;
    }

    public String getSmdesc() {
        return smdesc;
    }

    public void setSmdesc(String smdesc) {
        this.smdesc = smdesc;
    }

    public Float getSmprice() {
        return smprice;
    }

    public void setSmprice(Float smprice) {
        this.smprice = smprice;
    }

    public String getSmcalorie() {
        return smcalorie;
    }

    public void setSmcalorie(String smcalorie) {
        this.smcalorie = smcalorie;
    }

    public String getSmprotein() {
        return smprotein;
    }

    public void setSmprotein(String smprotein) {
        this.smprotein = smprotein;
    }

    public String getSmsugar() {
        return smsugar;
    }

    public void setSmsugar(String smsugar) {
        this.smsugar = smsugar;
    }

    public Integer getSmstate() {
        return smstate;
    }

    public void setSmstate(Integer smstate) {
        this.smstate = smstate;
    }

    public String getDid() {
        return did;
    }

    public void setDid(String did) {
        this.did = did;
    }

    public List<SetmealFood> getSetmealFoods() {
        return setmealFoods;
    }

    public void setSetmealFoods(List<SetmealFood> setmealFoods) {
        this.setmealFoods = setmealFoods;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Setmeal other = (Setmeal) that;
        return (this.getSmid() == null ? other.getSmid() == null : this.getSmid().equals(other.getSmid()))
            && (this.getSmname() == null ? other.getSmname() == null : this.getSmname().equals(other.getSmname()))
            && (this.getSmdesc() == null ? other.getSmdesc() == null : this.getSmdesc().equals(other.getSmdesc()))
            && (this.getSmprice() == null ? other.getSmprice() == null : this.getSmprice().equals(other.getSmprice()))
            && (this.getSmcalorie() == null ? other.getSmcalorie() == null : this.getSmcalorie().equals(other.getSmcalorie()))
            && (this.getSmprotein() == null ? other.getSmprotein() == null : this.getSmprotein().equals(other.getSmprotein()))
            && (this.getSmsugar() == null ? other.getSmsugar() == null : this.getSmsugar().equals(other.getSmsugar()))
            && (this.getSmstate() == null ? other.getSmstate() == null : this.getSmstate().equals(other.getSmstate()))
            && (this.getDid() == null ? other.getDid() == null : this.getDid().equals(other.getDid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSmid() == null) ? 0 : getSmid().hashCode());
        result = prime * result + ((getSmname() == null) ? 0 : getSmname().hashCode());
        result = prime * result + ((getSmdesc() == null) ? 0 : getSmdesc().hashCode());
        result = prime * result + ((getSmprice() == null) ? 0 : getSmprice().hashCode());
        result = prime * result + ((getSmcalorie() == null) ? 0 : getSmcalorie().hashCode());
        result = prime * result + ((getSmprotein() == null) ? 0 : getSmprotein().hashCode());
        result = prime * result + ((getSmsugar() == null) ? 0 : getSmsugar().hashCode());
        result = prime * result + ((getSmstate() == null) ? 0 : getSmstate().hashCode());
        result = prime * result + ((getDid() == null) ? 0 : getDid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", smid=").append(smid);
        sb.append(", smname=").append(smname);
        sb.append(", smdesc=").append(smdesc);
        sb.append(", smprice=").append(smprice);
        sb.append(", smcalorie=").append(smcalorie);
        sb.append(", smprotein=").append(smprotein);
        sb.append(", smsugar=").append(smsugar);
        sb.append(", smstate=").append(smstate);
        sb.append(", did=").append(did);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}